<?php
get_header();

include_once(ABSPATH . WPINC . '/feed.php');
global $wpdb;

bs_import_feeds();
/*
$rss = fetch_feed('http://feeds.engadget.com/weblogsinc/engadget');
if ( ! is_wp_error($rss) )
{
	$maxitems = $rss->get_item_quantity(5);
	$rss_items = $rss->get_items(0, $maxitems);
	
	foreach( $rss_items as $item )
	{
		$title = esc_html( $item->get_title() );
		$datetime = $item->get_date('Y-m-d H:i:s'); 
		$excerpt = $item->get_description(true);
		$content = $item->get_content();
		$source = esc_url( $item->get_permalink() );
		$provider = 'Engadget';
		
		$wpdb->insert(
			'projectfb_custom_feeds',
			array(
				'title' => $title,
				'datetime' => $datetime,
				'excerpt' => $excerpt,
				'content' => $content,
				'source' => $source,
				'provider' => $provider
			),
			array(
				'%s',
				'%s',
				'%s',
				'%s',
				'%s',
				'%s',
			)
		);
		?>
		<li class="item" style="margin:5px 0 5px 0">
			<?php echo esc_html( $item->get_title() ); ?>
			<br />
			Source: <?php echo esc_url( $item->get_permalink() ); ?>
			<br />
			<?php echo $item->get_date('Y-m-d H:i:s'); ?>
			<br />
			<?php echo $item->get_description(true); ?>
			<br />
			<?php echo $item->get_content(); ?>
		</li>
		<?php
	}
}
*/


get_footer();
?>